/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package interfaz;

import java.awt.Color;
import java.awt.Graphics;
import java.io.File;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Enumeration;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.DefaultTableModel;
import main_package.*;

/**
 *
 * @author Dario
 */
public class VentanaExperto extends javax.swing.JFrame {

    /**
     * Creates new form VentanaSecretario
     */
    private String ruta_convo;
    private Usuario usuario;
    private Plantilla pl;
    private Vector<Criterio> criterios;
    private Vector<Usuario> us;
    Vector<Integer> IN_idInvitaciones;
    Vector<Integer> IN_idProyectos = new Vector<Integer>();
    Vector<Proyecto> vp = new Vector<Proyecto>();
    private Consultas consultas;
    private InformeParcial ip;

    public VentanaExperto() {
        initComponents();
    }
    public VentanaExperto(Usuario user){
        initComponents();        
        this.setVisible(true);        
        this.setTitle("Experto "+user.getnombre()+" "+user.getapellidos());
        this.setLocationRelativeTo(null);
        if(user.getsexo().equals("Hombre"))bienvenida.setText("Bienvenido\n D. "
                +user.getnombre()+" "+user.getapellidos());
        else bienvenida.setText("Bienvenida\n Dª. "
                +user.getnombre()+" "+user.getapellidos());
        usuario = user;
        criterios=new Vector<Criterio>();
        consultas=user.getConsultas();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bG = new javax.swing.ButtonGroup();
        bGC = new javax.swing.ButtonGroup();
        jPanel3 = new javax.swing.JPanel();
        Salir = new javax.swing.JButton();
        Opciones = new javax.swing.JPanel();
        IN = new javax.swing.JButton();
        CP = new javax.swing.JButton();
        IP = new javax.swing.JButton();
        Caja = new javax.swing.JPanel();
        Inicio = new javax.swing.JPanel();
        jLabel28 = new javax.swing.JLabel();
        jLabel55 = new javax.swing.JLabel();
        bienvenida = new javax.swing.JLabel();
        Invitaciones = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        IN_rechazar = new javax.swing.JButton();
        IN_aceptar = new javax.swing.JButton();
        verProyecto = new javax.swing.JButton();
        verConvocatoria = new javax.swing.JButton();
        jScrollPane5 = new javax.swing.JScrollPane();
        invitaciones = new javax.swing.JTable();
        ConsultarProyectos = new javax.swing.JPanel();
        jLabel56 = new javax.swing.JLabel();
        jScrollPane6 = new javax.swing.JScrollPane();
        CP_proyectos = new javax.swing.JPanel();
        CP_verpro = new javax.swing.JButton();
        CP_verconv = new javax.swing.JButton();
        CP_realizar = new javax.swing.JButton();
        CP_continuar = new javax.swing.JButton();
        Inform = new javax.swing.JPanel();
        IP_nombre = new javax.swing.JTextField();
        IP_fecha = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        IP_email = new javax.swing.JTextField();
        IP_apellidos = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        IP_editar = new javax.swing.JButton();
        jLabel26 = new javax.swing.JLabel();
        IP_dni = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        IP_telefono = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        IP_direccion = new javax.swing.JTextField();
        IP_universidad = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        IP_estudios = new javax.swing.JTextField();
        jSeparator5 = new javax.swing.JSeparator();
        jLabel34 = new javax.swing.JLabel();
        IP_nota = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        IP_entidad = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        IP_cc = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        IP_palabras = new javax.swing.JTextField();
        IP_sexo = new javax.swing.JTextField();
        IP_estado = new javax.swing.JTextField();
        EditInfo = new javax.swing.JPanel();
        IP_nombre1 = new javax.swing.JTextField();
        IP_dia1 = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        IP_email1 = new javax.swing.JTextField();
        IP_apellidos1 = new javax.swing.JTextField();
        jLabel41 = new javax.swing.JLabel();
        IP_dominio1 = new javax.swing.JComboBox();
        IP_guardar = new javax.swing.JButton();
        jLabel42 = new javax.swing.JLabel();
        IP_dni1 = new javax.swing.JTextField();
        IP_año1 = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        IP_sexo1 = new javax.swing.JComboBox();
        IP_estado1 = new javax.swing.JComboBox();
        IP_mes1 = new javax.swing.JTextField();
        IP_telefono1 = new javax.swing.JTextField();
        jLabel48 = new javax.swing.JLabel();
        IP_direccion1 = new javax.swing.JTextField();
        IP_universidad1 = new javax.swing.JTextField();
        jLabel49 = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        IP_estudios1 = new javax.swing.JTextField();
        jSeparator6 = new javax.swing.JSeparator();
        jLabel51 = new javax.swing.JLabel();
        IP_nota1 = new javax.swing.JTextField();
        jLabel52 = new javax.swing.JLabel();
        IP_entidad1 = new javax.swing.JTextField();
        jLabel53 = new javax.swing.JLabel();
        IP_cc1 = new javax.swing.JTextField();
        jLabel54 = new javax.swing.JLabel();
        IP_palabras1 = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setResizable(false);

        Salir.setText("salir");
        Salir.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                SalirMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap(766, Short.MAX_VALUE)
                .addComponent(Salir)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Salir)
                .addContainerGap(15, Short.MAX_VALUE))
        );

        getContentPane().add(jPanel3, java.awt.BorderLayout.NORTH);

        Opciones.setBorder(javax.swing.BorderFactory.createTitledBorder("Opciones"));

        IN.setText("Invitaciones");
        IN.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                INMouseClicked(evt);
            }
        });
        IN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                INActionPerformed(evt);
            }
        });

        CP.setText("Consultar Proyectos");
        CP.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CPMouseClicked(evt);
            }
        });
        CP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CPActionPerformed(evt);
            }
        });

        IP.setText("Información Personal");
        IP.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                IPMouseClicked(evt);
            }
        });
        IP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout OpcionesLayout = new javax.swing.GroupLayout(Opciones);
        Opciones.setLayout(OpcionesLayout);
        OpcionesLayout.setHorizontalGroup(
            OpcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(OpcionesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(OpcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(IN, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(CP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(IP, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE))
                .addContainerGap())
        );
        OpcionesLayout.setVerticalGroup(
            OpcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(OpcionesLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(IN)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(CP)
                .addGap(145, 145, 145)
                .addComponent(IP)
                .addContainerGap())
        );

        getContentPane().add(Opciones, java.awt.BorderLayout.WEST);

        Caja.setLayout(new java.awt.CardLayout());

        Inicio.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "  ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 0)));

        jLabel28.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel28.setForeground(new java.awt.Color(26, 49, 60));
        jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel28.setText("Usted se ha registrado como Experto, por favor");

        jLabel55.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel55.setForeground(new java.awt.Color(26, 49, 60));
        jLabel55.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel55.setText("seleccione una opción para comenzar.");

        bienvenida.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N
        bienvenida.setForeground(new java.awt.Color(26, 49, 60));
        bienvenida.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        bienvenida.setText(" ");

        javax.swing.GroupLayout InicioLayout = new javax.swing.GroupLayout(Inicio);
        Inicio.setLayout(InicioLayout);
        InicioLayout.setHorizontalGroup(
            InicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(InicioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(InicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel55, javax.swing.GroupLayout.DEFAULT_SIZE, 627, Short.MAX_VALUE)
                    .addComponent(bienvenida, javax.swing.GroupLayout.DEFAULT_SIZE, 627, Short.MAX_VALUE))
                .addContainerGap())
        );
        InicioLayout.setVerticalGroup(
            InicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(InicioLayout.createSequentialGroup()
                .addGap(89, 89, 89)
                .addComponent(bienvenida)
                .addGap(26, 26, 26)
                .addComponent(jLabel28)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel55)
                .addContainerGap(150, Short.MAX_VALUE))
        );

        Caja.add(Inicio, "card2");

        Invitaciones.setBorder(javax.swing.BorderFactory.createTitledBorder("Invitaciones"));

        jLabel8.setText("Lista de invitaciones:");

        IN_rechazar.setText("Rechazar Invitación");
        IN_rechazar.setToolTipText("");
        IN_rechazar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                IN_rechazarMouseClicked(evt);
            }
        });
        IN_rechazar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IN_rechazarActionPerformed(evt);
            }
        });

        IN_aceptar.setText("Aceptar Invitación");
        IN_aceptar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                IN_aceptarMouseClicked(evt);
            }
        });

        verProyecto.setText("Ver Proyecto");
        verProyecto.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                verProyectoMouseClicked(evt);
            }
        });

        verConvocatoria.setText("Ver Convocatoria");
        verConvocatoria.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                verConvocatoriaMouseClicked(evt);
            }
        });
        verConvocatoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                verConvocatoriaActionPerformed(evt);
            }
        });

        invitaciones.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Selección", "Proyecto", "Convocatoria"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                true, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane5.setViewportView(invitaciones);

        javax.swing.GroupLayout InvitacionesLayout = new javax.swing.GroupLayout(Invitaciones);
        Invitaciones.setLayout(InvitacionesLayout);
        InvitacionesLayout.setHorizontalGroup(
            InvitacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(InvitacionesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(InvitacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(InvitacionesLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 339, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(InvitacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(InvitacionesLayout.createSequentialGroup()
                        .addComponent(IN_rechazar)
                        .addGap(24, 24, 24)
                        .addComponent(IN_aceptar))
                    .addComponent(verProyecto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(verConvocatoria, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(20, 20, 20))
        );
        InvitacionesLayout.setVerticalGroup(
            InvitacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(InvitacionesLayout.createSequentialGroup()
                .addGroup(InvitacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(InvitacionesLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                    .addGroup(InvitacionesLayout.createSequentialGroup()
                        .addGap(120, 120, 120)
                        .addComponent(verProyecto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(verConvocatoria)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 134, Short.MAX_VALUE)
                        .addGroup(InvitacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(IN_aceptar)
                            .addComponent(IN_rechazar))))
                .addContainerGap())
        );

        Caja.add(Invitaciones, "card2");

        ConsultarProyectos.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Consultar Proyectos", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 0)));

        jLabel56.setText("Selecciona Proyecto:");

        CP_proyectos.setLayout(new javax.swing.BoxLayout(CP_proyectos, javax.swing.BoxLayout.Y_AXIS));
        jScrollPane6.setViewportView(CP_proyectos);

        CP_verpro.setText("Ver Proyecto");
        CP_verpro.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CP_verproMouseClicked(evt);
            }
        });

        CP_verconv.setText("Ver Convocatoria");
        CP_verconv.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CP_verconvMouseClicked(evt);
            }
        });
        CP_verconv.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CP_verconvActionPerformed(evt);
            }
        });

        CP_realizar.setText("Realizar Informe");
        CP_realizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CP_realizarMouseClicked(evt);
            }
        });
        CP_realizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CP_realizarActionPerformed(evt);
            }
        });

        CP_continuar.setText("Continuar Informe");
        CP_continuar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CP_continuarMouseClicked(evt);
            }
        });
        CP_continuar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CP_continuarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout ConsultarProyectosLayout = new javax.swing.GroupLayout(ConsultarProyectos);
        ConsultarProyectos.setLayout(ConsultarProyectosLayout);
        ConsultarProyectosLayout.setHorizontalGroup(
            ConsultarProyectosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ConsultarProyectosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ConsultarProyectosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel56)
                    .addGroup(ConsultarProyectosLayout.createSequentialGroup()
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(96, 96, 96)
                        .addGroup(ConsultarProyectosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(CP_verconv, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(CP_verpro, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(CP_realizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(CP_continuar, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(153, Short.MAX_VALUE))
        );
        ConsultarProyectosLayout.setVerticalGroup(
            ConsultarProyectosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ConsultarProyectosLayout.createSequentialGroup()
                .addGroup(ConsultarProyectosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(ConsultarProyectosLayout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addComponent(jLabel56)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 284, Short.MAX_VALUE))
                    .addGroup(ConsultarProyectosLayout.createSequentialGroup()
                        .addGap(102, 102, 102)
                        .addComponent(CP_verpro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(CP_verconv)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(CP_realizar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(CP_continuar)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );

        Caja.add(ConsultarProyectos, "card2");

        Inform.setBorder(javax.swing.BorderFactory.createTitledBorder("Información Personal"));

        jLabel21.setText("Nombre");

        jLabel22.setText("DNI");

        jLabel23.setText("Email");

        jLabel25.setText("Apellidos");

        IP_editar.setText("Editar");
        IP_editar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                IP_editarMouseClicked(evt);
            }
        });
        IP_editar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IP_editarActionPerformed(evt);
            }
        });

        jLabel26.setText("Fecha Nacimiento");

        jLabel29.setText("Sexo");

        jLabel30.setText("Estado Civil");

        jLabel31.setText("Telefono");

        jLabel32.setText("Dirección");

        jLabel24.setText("Universidad");

        jLabel33.setText("Estudios");

        jLabel34.setText("Nota");

        jLabel35.setText("Entidad Bancaria");

        jLabel36.setText("CC");

        jLabel37.setText("Palabras Clave");

        javax.swing.GroupLayout InformLayout = new javax.swing.GroupLayout(Inform);
        Inform.setLayout(InformLayout);
        InformLayout.setHorizontalGroup(
            InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator5, javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(InformLayout.createSequentialGroup()
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(InformLayout.createSequentialGroup()
                        .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(InformLayout.createSequentialGroup()
                                .addGap(43, 43, 43)
                                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE))
                                .addGap(10, 10, 10)
                                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(InformLayout.createSequentialGroup()
                                        .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(IP_nombre)
                                            .addComponent(IP_dni)
                                            .addComponent(IP_telefono, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(IP_sexo))
                                        .addGap(33, 33, 33)
                                        .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(InformLayout.createSequentialGroup()
                                                .addComponent(jLabel25, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
                                                .addGap(18, 18, 18)
                                                .addComponent(IP_apellidos, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(InformLayout.createSequentialGroup()
                                                .addComponent(jLabel23)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(IP_email))
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, InformLayout.createSequentialGroup()
                                                .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(InformLayout.createSequentialGroup()
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                        .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addGroup(InformLayout.createSequentialGroup()
                                                        .addGap(41, 41, 41)
                                                        .addComponent(IP_estado))))
                                            .addGroup(InformLayout.createSequentialGroup()
                                                .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(IP_fecha))))
                                    .addComponent(IP_direccion)))
                            .addGroup(InformLayout.createSequentialGroup()
                                .addGap(44, 44, 44)
                                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(InformLayout.createSequentialGroup()
                                        .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabel37, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                    .addGroup(InformLayout.createSequentialGroup()
                                        .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(40, 40, 40)))
                                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(InformLayout.createSequentialGroup()
                                        .addComponent(IP_universidad, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(2, 2, 2)
                                        .addComponent(IP_estudios, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(IP_nota, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addGroup(InformLayout.createSequentialGroup()
                                            .addComponent(IP_entidad, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(IP_cc, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(IP_palabras)))))
                        .addGap(0, 31, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, InformLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(IP_editar, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        InformLayout.setVerticalGroup(
            InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, InformLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(IP_nombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel25)
                    .addComponent(IP_apellidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(IP_fecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel26)
                    .addComponent(jLabel27)
                    .addComponent(IP_dni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(jLabel30)
                    .addComponent(IP_sexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(IP_estado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(IP_telefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23)
                    .addComponent(IP_email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(IP_direccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel32))
                .addGap(18, 18, 18)
                .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(IP_universidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel33)
                    .addComponent(IP_estudios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(IP_nota, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(IP_palabras, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(InformLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel35)
                    .addComponent(IP_entidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel36)
                    .addComponent(IP_cc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE)
                .addComponent(IP_editar)
                .addContainerGap())
        );

        Caja.add(Inform, "card7");

        EditInfo.setBorder(javax.swing.BorderFactory.createTitledBorder("Información Personal"));

        jLabel38.setText("Nombre");

        jLabel39.setText("DNI");

        jLabel40.setText("Email");

        jLabel41.setText("Apellidos");

        IP_dominio1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "@gmail.com", "@hotmail.com", "@hotmail.es" }));
        IP_dominio1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IP_dominio1ActionPerformed(evt);
            }
        });

        IP_guardar.setText("Guardar");
        IP_guardar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                IP_guardarMouseClicked(evt);
            }
        });
        IP_guardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IP_guardarActionPerformed(evt);
            }
        });

        jLabel42.setText("Fecha Nacimiento");

        jLabel43.setText("/");

        jLabel44.setText("/");

        jLabel45.setText("Sexo");

        jLabel46.setText("Estado Civil");

        jLabel47.setText("Telefono");

        IP_sexo1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Hombre", "Mujer" }));

        IP_estado1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Casado", "Soltero", "Divorciado", "Viudo" }));
        IP_estado1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IP_estado1ActionPerformed(evt);
            }
        });

        jLabel48.setText("Dirección");

        jLabel49.setText("Universidad");

        jLabel50.setText("Estudios");

        jLabel51.setText("Nota");

        jLabel52.setText("Entidad Bancaria");

        jLabel53.setText("CC");

        jLabel54.setText("Palabras Clave");

        javax.swing.GroupLayout EditInfoLayout = new javax.swing.GroupLayout(EditInfo);
        EditInfo.setLayout(EditInfoLayout);
        EditInfoLayout.setHorizontalGroup(
            EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator6, javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(EditInfoLayout.createSequentialGroup()
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(EditInfoLayout.createSequentialGroup()
                        .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(EditInfoLayout.createSequentialGroup()
                                .addGap(43, 43, 43)
                                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel39, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel45, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel47, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel48, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE))
                                .addGap(10, 10, 10)
                                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(EditInfoLayout.createSequentialGroup()
                                        .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(IP_nombre1)
                                            .addComponent(IP_dni1)
                                            .addComponent(IP_sexo1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(IP_telefono1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(33, 33, 33)
                                        .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addGroup(EditInfoLayout.createSequentialGroup()
                                                .addComponent(jLabel41, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addGap(18, 18, 18)
                                                .addComponent(IP_apellidos1, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(EditInfoLayout.createSequentialGroup()
                                                .addComponent(jLabel46, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(38, 38, 38)
                                                .addComponent(IP_estado1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                            .addGroup(EditInfoLayout.createSequentialGroup()
                                                .addComponent(jLabel42, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(IP_dia1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(jLabel43, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(IP_mes1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(13, 13, 13)
                                                .addComponent(jLabel44, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(IP_año1))
                                            .addGroup(EditInfoLayout.createSequentialGroup()
                                                .addComponent(jLabel40)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(IP_email1, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(IP_dominio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                    .addComponent(IP_direccion1)))
                            .addGroup(EditInfoLayout.createSequentialGroup()
                                .addGap(44, 44, 44)
                                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(EditInfoLayout.createSequentialGroup()
                                        .addComponent(jLabel49, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(IP_universidad1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(43, 43, 43)
                                        .addComponent(jLabel50, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(IP_estudios1, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel51, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(IP_nota1, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, EditInfoLayout.createSequentialGroup()
                                        .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabel54, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel52, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addGroup(EditInfoLayout.createSequentialGroup()
                                                .addComponent(IP_entidad1, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel53, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(IP_cc1, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(IP_palabras1))))))
                        .addGap(0, 50, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, EditInfoLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(IP_guardar, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        EditInfoLayout.setVerticalGroup(
            EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, EditInfoLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(IP_nombre1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel41)
                    .addComponent(IP_apellidos1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel39)
                    .addComponent(IP_dia1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel42)
                    .addComponent(IP_año1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel43)
                    .addComponent(jLabel44)
                    .addComponent(IP_dni1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(IP_mes1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel45)
                    .addComponent(jLabel46)
                    .addComponent(IP_sexo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(IP_estado1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel47)
                    .addComponent(IP_telefono1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(IP_dominio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(IP_email1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(IP_direccion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel48))
                .addGap(18, 18, 18)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel49)
                    .addComponent(IP_universidad1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel50)
                    .addComponent(IP_estudios1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(IP_nota1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel51))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel54)
                    .addComponent(IP_palabras1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(EditInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel52)
                    .addComponent(IP_entidad1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel53)
                    .addComponent(IP_cc1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE)
                .addComponent(IP_guardar)
                .addContainerGap())
        );

        Caja.add(EditInfo, "card7");

        getContentPane().add(Caja, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void INActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_INActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_INActionPerformed

    private void CPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CPActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CPActionPerformed

    private void INMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_INMouseClicked
        ocultarTodo();
        Invitaciones.setVisible(true);
        IN.setBackground(new java.awt.Color(38, 64, 82));
        IN.setForeground(Color.white);
        //añadir filas tabla        
        try {
            IN_idInvitaciones = consultas.consultaLista_Invitaciones(usuario.getdni());
            DefaultTableModel model = (DefaultTableModel)(invitaciones.getModel());		
            //ACTUALIZAR TABLA
            for(int j=model.getRowCount()-1; j>=0; j--){
                model.removeRow(j);			
            }

            for(int i=0; i<IN_idInvitaciones.size(); i++) {               
                int idP=consultas.consulta_IdProyectos(IN_idInvitaciones.get(i));
                IN_idProyectos.add(idP);
                String proyecto = consultas.consultaTituloProyecto(idP);
                int idC = consultas.consultarConvocatoria(idP);
                String convocatoria = consultas.consultarNombreConvocatoria(idC);
                Object [] nuevaFila = new Object []{null, proyecto, convocatoria};
                model.addRow(nuevaFila);
            }
            invitaciones.setModel(model);
            repaint();
            Invitaciones.setVisible(true);
            
        } catch (SQLException ex) {
            Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_INMouseClicked

    private void CPMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CPMouseClicked
        ocultarTodo();
        CP.setBackground(new java.awt.Color(38, 64, 82));
        CP.setForeground(Color.white);
        ConsultarProyectos.setVisible(true);
        CP_proyectos.removeAll();
        try {
            vp = usuario.Consultar_proyectos();
        } catch (Exception ex) {
            Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
        }
        for(int i=0; i<vp.size(); i++){
            JRadioButton rb= new JRadioButton();
            rb.setText(vp.get(i).getTitulo());
            rb.setMnemonic(vp.get(i).getIdProyectos());
            bG.add(rb);
            CP_proyectos.add(rb);
        }
    }//GEN-LAST:event_CPMouseClicked

    private void IPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IPActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_IPActionPerformed

    private void IPMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_IPMouseClicked
        ocultarTodo();
        IP.setBackground(new java.awt.Color(38, 64, 82));
        IP.setForeground(Color.white);
        IP_nombre.setText(usuario.getnombre()); IP_nombre.setEnabled(false);
        IP_apellidos.setText(usuario.getapellidos()); IP_apellidos.setEnabled(false);
        IP_dni.setText(usuario.getdni()); IP_dni.setEnabled(false);
        IP_fecha.setText(usuario.getfecha_nacimiento()); IP_fecha.setEnabled(false);
        IP_sexo.setText(usuario.getsexo()); IP_sexo.setEnabled(false);
        IP_estado.setText(usuario.getestado_civil()); IP_estado.setEnabled(false);
        IP_telefono.setText(usuario.gettelefono()+""); IP_telefono.setEnabled(false);
        IP_email.setText(usuario.getcorreo()); IP_email.setEnabled(false);
        IP_direccion.setText(usuario.getdireccion()); IP_direccion.setEnabled(false);
        IP_universidad.setText(usuario.getuniversidad()); IP_universidad.setEnabled(false);
        IP_estudios.setText(usuario.getestudios()); IP_estudios.setEnabled(false);
        IP_nota.setText(usuario.getnota()+""); IP_nota.setEnabled(false);
        IP_palabras.setText(usuario.getpalabras()); IP_palabras.setEnabled(false);
        IP_entidad.setText(usuario.getentidad_bancaria()); IP_entidad.setEnabled(false);
        IP_cc.setText(usuario.getcuenta()+""); IP_cc.setEnabled(false);
        Inform.updateUI();       
        Inform.setVisible(true);
    }//GEN-LAST:event_IPMouseClicked

    private void IN_rechazarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_IN_rechazarMouseClicked
        DefaultTableModel model = (DefaultTableModel)(invitaciones.getModel());
        for(int i=0; i<model.getRowCount(); i++){
            if(model.getValueAt(i, 0)!=null){
                try {
                    String dni = consultas.getUsuarioDeInvitacion(IN_idInvitaciones.get(i));
                    Invitacion invitacion = new Invitacion(IN_idInvitaciones.get(i), dni, 
                            consultas.consulta_IdProyectos(IN_idInvitaciones.get(i)), "RECHAZADO", consultas);
                    invitacion.actualizar(consultas);
                   
                } catch (SQLException ex) {
                    Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        INMouseClicked(null);
    }//GEN-LAST:event_IN_rechazarMouseClicked

    private void IN_aceptarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_IN_aceptarMouseClicked
        DefaultTableModel model = (DefaultTableModel)(invitaciones.getModel());
        for(int i=0; i<model.getRowCount(); i++){
            if(model.getValueAt(i, 0)!=null){
                try {
                    String dni = consultas.getUsuarioDeInvitacion(IN_idInvitaciones.get(i));
                    Invitacion invitacion = new Invitacion(IN_idInvitaciones.get(i), dni, 
                            consultas.consulta_IdProyectos(IN_idInvitaciones.get(i)), "ASIGNADO", consultas);
                    invitacion.actualizar(consultas);
                   
                } catch (SQLException ex) {
                    Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        INMouseClicked(null);
    }//GEN-LAST:event_IN_aceptarMouseClicked

    private void IP_editarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_IP_editarMouseClicked
        ocultarTodo();
        IP.setBackground(new java.awt.Color(38, 64, 82));
        IP.setForeground(Color.white);
        IP_nombre1.setText(usuario.getnombre());
        IP_apellidos1.setText(usuario.getapellidos());
        IP_dni1.setText(usuario.getdni());
        Pattern patron = Pattern.compile("(\\d+)/(\\d+)/(\\d+)");
        try{
            Matcher matcher = patron.matcher(usuario.getfecha_nacimiento());
            matcher.find();
            IP_dia1.setText(matcher.group(1));
            IP_mes1.setText(matcher.group(2));
            IP_año1.setText(matcher.group(3));
        }
        catch(Exception e){
        }
        IP_telefono1.setText(usuario.gettelefono()+"");
        patron = Pattern.compile("[^@]*");
        try{
            Matcher matcher = patron.matcher(usuario.getcorreo());
            matcher.find();
            IP_email1.setText(matcher.group(0));
        }
        catch(Exception e){
        }        
        IP_direccion1.setText(usuario.getdireccion());
        IP_universidad1.setText(usuario.getuniversidad());
        IP_estudios1.setText(usuario.getestudios());
        IP_nota1.setEnabled(false);
        IP_palabras1.setText(usuario.getpalabras());
        IP_entidad1.setText(usuario.getentidad_bancaria());
        IP_cc1.setText(usuario.getcuenta()+"");
                
        EditInfo.setVisible(true);
    }//GEN-LAST:event_IP_editarMouseClicked

    private void IP_editarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IP_editarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_IP_editarActionPerformed

    private void IP_dominio1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IP_dominio1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_IP_dominio1ActionPerformed

    private void IP_guardarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_IP_guardarMouseClicked
        try {
            usuario.setnombre(IP_nombre1.getText());
            usuario.setapellidos(IP_apellidos1.getText());
            IP_dni1.getText();
            usuario.setfecha_nacimiento(IP_dia1.getText()+"/"+IP_mes1.getText()+"/"+IP_año1.getText());
            usuario.setsexo(IP_sexo1.getSelectedItem().toString());
            usuario.setestado_civil(IP_estado1.getSelectedItem().toString());
            usuario.settelefono(Integer.parseInt(IP_telefono1.getText()));            
            usuario.setcorreo(IP_email1.getText()+IP_dominio1.getSelectedItem().toString());
            usuario.setdireccion(IP_direccion1.getText());
            usuario.setuniversidad(IP_universidad1.getText());
            usuario.setestudios(IP_estudios1.getText());
            IP_nota1.setText(usuario.getnota()+"");  IP_nota1.setEnabled(false);
            usuario.setpalabras(IP_palabras1.getText());
            usuario.setentidad_bancaria(IP_entidad1.getText());
            usuario.setnumero_cuenta(Integer.parseInt(IP_cc1.getText()));
            usuario.actualizar(IP_dni1.getText());            
            IPMouseClicked(null);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, "Datos Incorrectos.");
            Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_IP_guardarMouseClicked

    private void IP_guardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IP_guardarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_IP_guardarActionPerformed

    private void IP_estado1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IP_estado1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_IP_estado1ActionPerformed

    private void SalirMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SalirMouseClicked
        try{
            synchronized(this){
                notify();
            }
        }
        catch(Exception e){
            System.out.println(e);
        }
    }//GEN-LAST:event_SalirMouseClicked

    private void verConvocatoriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_verConvocatoriaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_verConvocatoriaActionPerformed

    private void IN_rechazarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IN_rechazarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_IN_rechazarActionPerformed

    private void verProyectoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_verProyectoMouseClicked
        DefaultTableModel model = (DefaultTableModel)(invitaciones.getModel());
        for(int i=0; i<model.getRowCount(); i++){
            if(model.getValueAt(i, 0)!=null){
                String ruta;
                try {
                    int idP = consultas.consulta_IdProyectos(IN_idInvitaciones.get(i));
                    ruta = consultas.getRutaProyecto(idP);
                    System.out.println(ruta);
                    String comando[] = {"C:/Program Files (x86)/Adobe/Acrobat 9.0/Acrobat/Acrobat", ruta };
                    
                    try {
                        Runtime.getRuntime().exec(comando);
                    }catch (Exception e) {
                        e.printStackTrace();
                    }
                } catch (SQLException ex) {
                    Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
                }
            }                
        }        
    }//GEN-LAST:event_verProyectoMouseClicked

    private void verConvocatoriaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_verConvocatoriaMouseClicked
        DefaultTableModel model = (DefaultTableModel)(invitaciones.getModel());
        for(int i=0; i<model.getRowCount(); i++){
            if(model.getValueAt(i, 0)!=null){
                String ruta;
                try {
                    int idP = consultas.consulta_IdProyectos(IN_idInvitaciones.get(i));
                    int idC = consultas.consultarConvocatoria(idP);
                    ruta = consultas.getRutaConvocatoria(idC);                  
                    
                    System.out.println(ruta);
                    String comando[] = {"C:/Program Files (x86)/Adobe/Acrobat 9.0/Acrobat/Acrobat", ruta };
                    
                    try {
                        Runtime.getRuntime().exec(comando);
                    }catch (Exception e) {
                        e.printStackTrace();
                    }
                } catch (SQLException ex) {
                    Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
                }
            }                
        } 
    }//GEN-LAST:event_verConvocatoriaMouseClicked

    private void CP_verproMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CP_verproMouseClicked

        int idP = bG.getSelection().getMnemonic();
        String ruta;

        ruta = consultas.getRutaProyecto(idP);
        System.out.println(ruta);
        String comando[] = {"C:/Program Files (x86)/Adobe/Acrobat 9.0/Acrobat/Acrobat", ruta };

        try {
            Runtime.getRuntime().exec(comando);
        }catch (Exception e) {
            e.printStackTrace();
        }           
        
    }//GEN-LAST:event_CP_verproMouseClicked

    private void CP_verconvMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CP_verconvMouseClicked
        
        int idP = bG.getSelection().getMnemonic();
        String ruta;
        
        int idC = consultas.consultarConvocatoria(idP);
        ruta = consultas.getRutaConvocatoria(idC);    
        
        System.out.println(ruta);
        String comando[] = {"C:/Program Files (x86)/Adobe/Acrobat 9.0/Acrobat/Acrobat", ruta };

        try {
            Runtime.getRuntime().exec(comando);
        }catch (Exception e) {
            e.printStackTrace();
        }
    }//GEN-LAST:event_CP_verconvMouseClicked

    private void CP_verconvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CP_verconvActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CP_verconvActionPerformed

    private void CP_realizarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CP_realizarMouseClicked
        Plantilla plant = new Plantilla(consultas);
        int idP = bG.getSelection().getMnemonic();
        int idC=0;
        
        for(int i=0; i<vp.size(); i++){
            if(vp.get(i).getIdProyectos()==idP){
                idC=vp.get(i).getConvocatoria();
            }                        
        }        
        plant.setConvocatoria(idC);
        plant.setIdPlantilla(consultas.getIdPlantilla(idC));
        ip = new InformeParcial(consultas);
        ip.setEstado("EN_CURSO");
        ip.setExperto(usuario.getdni());
        ip.setProyecto(idP);
        try {
            ip.guardar();
        } catch (SQLException ex) {
            Logger.getLogger(VentanaExperto.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        PlantillaExpertoFrame plantilla = new PlantillaExpertoFrame(plant, ip.getIdInformeParcial(), consultas);
    }//GEN-LAST:event_CP_realizarMouseClicked

    private void CP_realizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CP_realizarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CP_realizarActionPerformed

    private void CP_continuarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CP_continuarMouseClicked
        Plantilla plant = new Plantilla(consultas);
        int idP = bG.getSelection().getMnemonic();
        int idC=0;
        
        for(int i=0; i<vp.size(); i++){
            if(vp.get(i).getIdProyectos()==idP){
                idC=vp.get(i).getConvocatoria();
            }                        
        }        
        plant.setConvocatoria(idC);
        plant.setIdPlantilla(consultas.getIdPlantilla(idC));

        int xxx=consultas.getIdInformeParcial(usuario.getdni(), idP);
        PlantillaExpertoFrame plantilla = new PlantillaExpertoFrame(plant, xxx, consultas);
    }//GEN-LAST:event_CP_continuarMouseClicked

    private void CP_continuarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CP_continuarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CP_continuarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VentanaExperto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VentanaExperto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VentanaExperto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VentanaExperto.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VentanaExperto().setVisible(true);
            }
        });
    }
    
    private void ocultarTodo(){
        EditInfo.setVisible(false);
        Inform.setVisible(false);
        ConsultarProyectos.setVisible(false);
        Invitaciones.setVisible(false);
        Inicio.setVisible(false);
        CP.setBackground(null);CP.setForeground(Color.BLACK);
        IP.setBackground(null);IP.setForeground(Color.BLACK);
        IN.setBackground(null);IN.setForeground(Color.BLACK);
    }
 
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton CP;
    private javax.swing.JButton CP_continuar;
    private javax.swing.JPanel CP_proyectos;
    private javax.swing.JButton CP_realizar;
    private javax.swing.JButton CP_verconv;
    private javax.swing.JButton CP_verpro;
    private javax.swing.JPanel Caja;
    private javax.swing.JPanel ConsultarProyectos;
    private javax.swing.JPanel EditInfo;
    private javax.swing.JButton IN;
    private javax.swing.JButton IN_aceptar;
    private javax.swing.JButton IN_rechazar;
    private javax.swing.JButton IP;
    private javax.swing.JTextField IP_apellidos;
    private javax.swing.JTextField IP_apellidos1;
    private javax.swing.JTextField IP_año1;
    private javax.swing.JTextField IP_cc;
    private javax.swing.JTextField IP_cc1;
    private javax.swing.JTextField IP_dia1;
    private javax.swing.JTextField IP_direccion;
    private javax.swing.JTextField IP_direccion1;
    private javax.swing.JTextField IP_dni;
    private javax.swing.JTextField IP_dni1;
    private javax.swing.JComboBox IP_dominio1;
    private javax.swing.JButton IP_editar;
    private javax.swing.JTextField IP_email;
    private javax.swing.JTextField IP_email1;
    private javax.swing.JTextField IP_entidad;
    private javax.swing.JTextField IP_entidad1;
    private javax.swing.JTextField IP_estado;
    private javax.swing.JComboBox IP_estado1;
    private javax.swing.JTextField IP_estudios;
    private javax.swing.JTextField IP_estudios1;
    private javax.swing.JTextField IP_fecha;
    private javax.swing.JButton IP_guardar;
    private javax.swing.JTextField IP_mes1;
    private javax.swing.JTextField IP_nombre;
    private javax.swing.JTextField IP_nombre1;
    private javax.swing.JTextField IP_nota;
    private javax.swing.JTextField IP_nota1;
    private javax.swing.JTextField IP_palabras;
    private javax.swing.JTextField IP_palabras1;
    private javax.swing.JTextField IP_sexo;
    private javax.swing.JComboBox IP_sexo1;
    private javax.swing.JTextField IP_telefono;
    private javax.swing.JTextField IP_telefono1;
    private javax.swing.JTextField IP_universidad;
    private javax.swing.JTextField IP_universidad1;
    private javax.swing.JPanel Inform;
    private javax.swing.JPanel Inicio;
    private javax.swing.JPanel Invitaciones;
    private javax.swing.JPanel Opciones;
    private javax.swing.JButton Salir;
    private javax.swing.ButtonGroup bG;
    private javax.swing.ButtonGroup bGC;
    private javax.swing.JLabel bienvenida;
    private javax.swing.JTable invitaciones;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JButton verConvocatoria;
    private javax.swing.JButton verProyecto;
    // End of variables declaration//GEN-END:variables

    public Plantilla getPlantilla() {
        return pl;
    }
    
    public int getIP_dni(){
        return Integer.parseInt(IP_dni1.getText());
    }


    public int getNP_convocatoria() {
        return bG.getSelection().getMnemonic();
    }


    public int getAC_conv() {
        return bG.getSelection().getMnemonic();
    }

}
